#ifndef USERINTERFACE_HPP
#define USERINTERFACE_HPP

#include "Common.hpp"

class UIState
{
public:
  glm::vec2 m_mousePosition; // not used at moment
  
  enum TransitionType {Stationary = 0, Increasing = 1, Decreasing = -1};
  
  TransitionType m_pitch;
  TransitionType m_yaw;
  TransitionType m_forwardMotion;
  TransitionType m_sidewaysMotion;
  bool m_e;
  bool m_w;
  bool m_s;
  bool m_a;
  bool m_d;
  bool m_q;
  int m_lights;
  bool m_space;
  vec2 m_cursor; //relative to the centre
  
};

class UserInterface
{
public:

  static void initCallbacks();
  
  // keyboard callbacks
  static void pressNormalKey(unsigned char key, int x, int y);
  static void releaseNormalKey(unsigned char key, int x, int y);
  static void pressSpecialKey(int key, int x, int y);
  static void releaseSpecialKey(int key, int x, int y);
  
  // mouse callbacks
  static void mouseFunc(int button, int state, int x, int y);
  static void motionFunc(int x, int y);
  
  //window callbacks
  static void reshapeFunc(int x, int y);
  
  static UIState g_state;
  
private:  
  UserInterface(); // disable instancing
  
  
};

#endif //USERINTERFACE_HPP
